<?php

class PostController extends AController
{
	public $asearchform;
	public function actionIndex()
	{	
		$this->asearchform = new AsearchForm();
		if(isset($_POST['AsearchForm']))
		{
			$this->asearchform->attributes = $_POST['AsearchForm'];
			if(!empty($this->asearchform->search))
			{
				$this->render('index',array(
					'searchcontent'=>$this->asearchform->search
				));
			}
			else
			{
				$this->redirect(Yii::app()->createUrl('wwpblogadmin'));
			}
		}
		else
		{
			$this->redirect(Yii::app()->createUrl('wwpblogadmin'));
		}		
	}
}